package cn.iocoder.yudao.module.form.service.impl;

import cn.iocoder.yudao.module.form.dataobject.FormChoose;
import cn.iocoder.yudao.module.form.mysql.FormChooseMapper;
import cn.iocoder.yudao.module.form.service.IFormChooseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 报选择Service业务层处理
 *
 * @author Fan KaiXiang
 * @date 2022-08-29
 */
@Service
public class FormChooseServiceImpl implements IFormChooseService
{
    @Autowired
    private FormChooseMapper formChooseMapper;


    /**
     * 查询报选择
     *
     * @param formId 报选择主键
     * @return 报选择
     */
    @Override
    public FormChoose selectFormChooseByFormId(Long formId)
    {
        return formChooseMapper.selectFormChooseByFormId(formId);
    }


    /**
     * 查询报选择列表
     *
     * @param formChoose 报选择
     * @return 报选择
     */
    @Override
    public List<FormChoose> selectFormChooseList(FormChoose formChoose)
    {
        return formChooseMapper.selectFormChooseList(formChoose);
    }


    /**
     * 新增报选择
     *
     * @param formChoose 报选择
     * @return 结果
     */
    @Override
    public int insertFormChoose(FormChoose formChoose)
    {
//        formChoose.setCreateTime(DateUtils.getNowDate());
        return formChooseMapper.insertFormChoose(formChoose);
    }

    /**
     * 修改报选择
     *
     * @param formChoose 报选择
     * @return 结果
     */
    @Override
    public int updateFormChoose(FormChoose formChoose)
    {
//        formChoose.setUpdateTime(DateUtils.getNowDate());
        return formChooseMapper.updateFormChoose(formChoose);
    }

    /**
     * 批量删除报选择
     *
     * @param formIds 需要删除的报选择主键
     * @return 结果
     */
    @Override
    public int deleteFormChooseByFormIds(Long[] formIds)
    {
        return formChooseMapper.deleteFormChooseByFormIds(formIds);
    }

    /**
     * 删除报选择信息
     *
     * @param formId 报选择主键
     * @return 结果
     */
    @Override
    public int deleteFormChooseByFormId(Long formId)
    {
        return formChooseMapper.deleteFormChooseByFormId(formId);
    }
}
